<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head lang="en">
    <link rel="stylesheet" type="text/css" href="AppStore/Public/bootstrap/css/bootstrap.min.css"/>
    <meta charset="UTF-8">
    <title>添加</title>
    <link href="/appstore/Public/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
    <script src="/appstore/Public/bootstrap/js/jquery.min.js" type="text/javascript"></script>
    <script src="/appstore/Public/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>


</head>

<body>
<!--自动接收updateUserInfo方法传来的User变量-->

<div class="container">

<form class="form-horizontal"  method="post" action="addUser" enctype="multipart/form-data">
    <!--隐藏id-->
   
    <div class="form-group ">
        <label for="username" class="col-md-2 control-label">用户名</label>
        <div class="col-md-5">
            <input type="text" class="form-control" id="username" name="username" placeholder="username" value="<?php echo ($user["username"]); ?>">
        </div>
    </div>
    <div class="form-group">
        <label for="pass"class="col-md-2 control-label">密码</label>
        <div class="col-md-5">
            <input type="password" class=" form-control " id="pass" name="pass" placeholder="password" value="<?php echo ($user["pass"]); ?>">
        </div>
    </div>

 <!--    <div class="form-group">
        <label for="pass2" class="col-md-2 control-label">确认密码</label>
        <div class="col-md-5">
            <input type="password" class="form-control" id="pass2" name="pass2" placeholder="confirm pass">
        </div>
    </div> -->

    <div class="form-group">
        <label for="email" class="col-md-2 control-label" >Email </label>
        <div class="col-md-5">
            <input type="email" class="form-control" id="email" name="email" placeholder="email" value="<?php echo ($user["email"]); ?>">
        </div>
    </div>

    <div class="form-group">
        <label for="tele" class="col-md-2 control-label">电话</label>
        <div class="col-md-5">
            <input type="text" class="form-control" id="tele" name="tele" placeholder="telephone" value="<?php echo ($user["tele"]); ?>">
        </div>
    </div>

    <div class="form-group">
        <label for="realname" class="col-md-2 control-label">用户真名</label>
        <div class="col-md-5">
            <input type="text" class="form-control" id="realname" name="realname" placeholder="realname" value="<?php echo ($user["realname"]); ?>">
        </div>
    </div>

    <div class="form-group">
        <label for="image" class="col-md-2 control-label">头像</label>
        <div class="col-md-3">
            <img clas="img-rounded" id="image" src="/appstore/Public/Uploads/photo/<?php echo ($user["photo"]); ?>" alt="..."/>
        </div>
    </div>
    <div class="form-group">
        <label for="photo" class="col-md-2 control-label">修改文件</label>
        <div class="col-md-2">
            <input type="file" id="photo" name="photo">
        </div>
    </div>

    <div class="form_group">
        <label for="intro" class="col-md-2 control-label">介绍</label>
        <div class="col-md-10">
            <textarea class="form-control " rows="5" cols="50" id="intro" name="intro">
               <?php echo ($user["intro"]); ?>
            </textarea>
        </div>
    </div>

    <div class="form_group">
        <label for="isstar" class="col-md-2 control-label">明星作者</label>
        <div class="col-md-10">
            <label class="radio-inline"  >
                <input type="radio" name="isstar" id="isstar" value="1"
                <?php if($user["isstar"] == 1): ?>checked<?php endif; ?> 
                >
                是
            </label>
            <label class="radio-inline">
                <input type="radio" name="isstar" id="isstar2" value="0"
				<?php if($user["isstar"] == 0): ?>checked<?php endif; ?> 
                >否
            </label>
        </div>
    </div>

    <div class="form_group">
        <label for="isfirst" class="col-md-2 control-label">首页推荐</label>
        <div class="col-md-10">
            <label class="radio-inline" >
                <input type="radio" name="isfirst" id="isfirst" value="1"
   <?php if($user["isfirst"] == 1): ?>checked<?php endif; ?> 
                >是
            </label>
            <label class="radio-inline">
                <input type="radio" name="is" id="is2" value="0"
   <?php if($user["isfirst"] == 0): ?>checked<?php endif; ?> 
                >否
            </label>
        </div>
    </div>

    <div class="form-group">
        <label for="state" class="col-md-2 control-label">状态</label>
        <div class="col-md-2">
            <select class="form-control" name="state" id="state">
                <option value="0"  <?php if($user["state"] == 0): ?>selected<?php endif; ?> >禁用</option>
                <option value="1" <?php if($user["state"] == 1): ?>selected<?php endif; ?>>普通</option>
                <option value="2" <?php if($user["state"] == 2): ?>selected<?php endif; ?>>禁言</option>
            </select>
        </div>
    </div>
    <div class="col-md-2 col-md-offset-5">
        <button type="submit" class="btn btn-default">修改用户</button>
    </div>


</form>
</div>
</body>
</html>

<!--<!DOCTYPE html>
<html>
<head>
	<title></title>
	<script src="http://localhost/appstore/Public/bootstrap/js/bootstrap.min.js"></script>
	<script src="http://localhost/appstore/Public/bootstrap/js/jquery.min.js"></script>
	 <link href="http://localhost/appstore/Public/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="texe/css">

</head>
<body>



<form method="post" action="update" enctype="multipart/form-data">
	<input type="hidden" name='id' >
  <div class="form-group">
    <label for="username">用户名</label>
    <input type="text" class="form-control" id="username" placeholder="username" name='username'>
  </div>
  <div class="form-group">
    <label for="pass">Password</label>
    <input type="password" class="form-control" id="pass" placeholder="Password" name='pass'>
  </div>

   <div class="form-group">
    <label for="pass2">Password</label>
    <input type="password" class="form-control" id="pass2" placeholder="confirm Password" name='pass2'>
  </div>


  <div class="form-group">
    <label for="email">email</label>
    <input type="email" class="form-control" id="email" placeholder="email" name='email'>
  </div>

  <div class="form-group">
    <label for="tele">电话</label>
    <input type="text" class="form-control" id="tele" placeholder="tele" name='tele'>
  </div>

   <div class="form-group">
    <label for="realname">用户真名</label>
    <input type="text" class="form-control" id="realname" placeholder="realname" name='realname'>
  </div>

   <div class="form-group">
    <label for="intro">介绍</label>
    <textarea rows='5' cols='50' class="form-control" id="intro"name='intro'>introduce</textarea>
  </div>

  <div class="form-group">
    <label for="exampleInputFile">File input</label>
    <input type="file" id="exampleInputFile">
    <p class="help-block">Example block-level help text here.</p>
  </div>
  <div class="checkbox">
    <label>
      <input type="checkbox"> Check me out
    </label>
  </div>
  <button type="submit" class="btn btn-default">Submit</button>
</form>



</body>
</html>-->